package com.treasure.hunt.mine

import android.app.Activity
import android.content.Intent
import com.blankj.utilcode.util.AppUtils
import com.module.lemlin.base.BaseAbstractActivity
import com.treasure.hunt.R
import kotlinx.android.synthetic.main.activity_mine_about.*


class MineAboutActivity : BaseAbstractActivity() {

    companion object {
        fun open(activity: Activity) {
            val intent = Intent(activity, MineAboutActivity::class.java)
            activity.startActivity(intent)
        }
    }

    override val layoutResId: Int
        get() = R.layout.activity_mine_about

    override fun stateBar(): StatusBar {
        return StatusBar(
            isLightMode = false,
            bottomColor = R.color.FF_020027,
            view = flMineAboutBar
        )
    }

    override fun initView() {

        tvAboutAppName.text = "${AppUtils.getAppName()}V${AppUtils.getAppVersionName()}"

        ivMineAboutBack.setOnClickListener {
            finish()
        }
        tvAboutUserAgree.setOnClickListener {
            MineConfigActivity.open(activity = this, title = "用户协议", name = "user_agreement")
        }
        tvAboutUserPrivacy.setOnClickListener {
            MineConfigActivity.open(activity = this, title = "隐私政策", name = "privacy_policy")
        }
    }
}